$(() => {
    let data = {
        /**应与后台交互，获取数据*/
        name: '花花',
        view: 950,
        join: 529,
        contents: [{
            img1: "http://placehold.it/64x64&text=IMG1",
            img2: "http://placehold.it/64x64&text=IMG2",
            title: "花花和她的宝宝们1",
            tags: ['花花', '日常', '最多3个'],
            user: 'yuanlu',
            love: 520
        }, {
            img1: "http://placehold.it/64x64&text=IMG3",
            img2: "http://placehold.it/64x64&text=IMG4",
            title: "花花和她的宝宝们2",
            tags: ['花花', '日常', '宝宝'],
            user: 'yuanlu',
            love: 666
        }]
    }
    $("#tag_name").text(data.name);
    $("#tag_view").text(data.view);
    $("#tag_join").text(data.join);
    for (j = 0; j < 100; j++)
        for (i in data.contents) $("#threads").append(buildContent(data.contents[i]));
});
let a = 0;

function buildContent(c) {
    return `<span class="module cat">
 <img src="${c.img1}" class="img-left">
 <img src="${c.img2}" class="img-top">
 <span class="description">${c.title}x${++a}</span>
 <span class="tag capsule">${c.tags}</span>
 <span class="user">${c.user}</span>
 <span class="love">
  <svg class="icon" aria-hidden="true"><use xlink:href="#icon-heart"></use></svg>
  <span class="love-amount">${c.love}</span>
 </span>
</span>`;
}